package org.example.springblogg.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.springblogg.model.UserInfo;

@Mapper
public interface UserInfoMapper {

    //根据用户名，查询用户信息：
    @Select("select * from user where delete_flag != 1 and user_name = #{userName}")
    UserInfo selectByName(String userName);


    //根据用户ID，查询用户信息:
    @Select("select * from user where delete_flag != 1 and id = #{id}")
    UserInfo selectUserById(Integer id);

}
